package com.abc.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Product {

    /** 产品编号 */
    private Integer id;

    /** 影像名称 */
    private String pName;

    /** 产品数量 */
    private Integer pNum;

    /** 影像类型 */
    private String pClassify;

    /** 制品类型 */
    private String pType;

    /** 租凭状态：外借(0)、可预约(1) */
    private String rentType;

    /** 是否可租：下架(0)、发布(1) */
    private String canRent;

    /** 预约时间 */

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date orderTime;

    /** 借出时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;

    /** 归还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /** 借给用户 */
    private String userid;

    /** 借给用户 */
    private String username;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }

    public Integer getpNum() {
        return pNum;
    }

    public void setpNum(Integer pNum) {
        this.pNum = pNum;
    }

    public String getpClassify() {
        return pClassify;
    }

    public void setpClassify(String pClassify) {
        this.pClassify = pClassify;
    }

    public String getpType() {
        return pType;
    }

    public void setpType(String pType) {
        this.pType = pType;
    }

    public String getRentType() {
        return rentType;
    }

    public void setRentType(String rentType) {
        this.rentType = rentType;
    }

    public String getCanRent() {
        return canRent;
    }

    public void setCanRent(String canRent) {
        this.canRent = canRent;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public Product(Integer id, String pName, Integer pNum, String pClassify, String pType, String rentType, String canRent, Date orderTime, Date beginTime, Date endTime, String userid, String username) {
        this.id = id;
        this.pName = pName;
        this.pNum = pNum;
        this.pClassify = pClassify;
        this.pType = pType;
        this.rentType = rentType;
        this.canRent = canRent;
        this.orderTime = orderTime;
        this.beginTime = beginTime;
        this.endTime = endTime;
        this.userid = userid;
        this.username = username;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", pName='" + pName + '\'' +
                ", pNum=" + pNum +
                ", pClassify='" + pClassify + '\'' +
                ", pType='" + pType + '\'' +
                ", rentType='" + rentType + '\'' +
                ", canRent='" + canRent + '\'' +
                ", orderTime=" + orderTime +
                ", beginTime=" + beginTime +
                ", endTime=" + endTime +
                ", userid='" + userid + '\'' +
                ", username='" + username + '\'' +
                '}';
    }
}
